#include <QApplication>

#include <QTreeView>
#include <QFileDialog>
#include <QMessageBox>


#include "projectexplorer/qthememodel.h"

int main(int argc, char ** argv)
{
    QApplication a(argc, argv);
    QTreeView tv;
    QThemeModel m;

    QString path = QFileDialog::getExistingDirectory(0, "KDE Theme");
    if (QThemeModel::isValid(path)) {
        tv.setModel(&m);
        m.setRootPath(path);
        tv.setRootIndex(m.index(m.rootPath()));
    }
    else
        QMessageBox::warning(&tv, "KDE Theme path", path + " is not a valid KDE theme path");

    tv.show();

    return a.exec();
}
